Fixed parallelism, memory allocations, added caching