Clean code and other optimizations.