Performance improvements
Code cleanup