Fixed majority of memory leaks except those in libs, only one remaining(need to talk about that one). Also fixed a few uninitialized variables so Valgrind is 99% happy now.