Fix Memory Leaks
Using Valgrind, I searched for memory leaks within the program.
I modified the code to use smart pointers where it is possible and added destructors where they were missing.
NOTE: I had to force the code to compile with c++ 14 in order to use smart pointers.