minor improvements to code style