updates to API 12 so we can use largeHeap option
all kinds of voodoo for preventing memory leaks. also, forces GC every 2 seconds. not sure if it makes a difference....