Improvements to code style