Performance improvements
Code style fixes