Fixed Memory Leaks

No more pointers. Yay? Works, but is incredibly slow on my pc? not using
100% CPU though.