added very basic garbage collector
enabled unit caching
GC fixes/improvements