MASSIVE fixes to memory usage and frequency of GC