Several performance improvements
Fixing spacing issue