Fixing Performance & Memory problems

Benchmarking