Added calls to GC to free up memory (hopefully)