improvements to code style