Reduced memory usage of some data structures
Should have removed file limit issue? Optimization still possible.