Fixed various memory leaks (C++ isn't garbage collected), added destructors to classes. Some places should probably be using references instead of pointers for clarity, but ill change that at a later date