minor style improvements and code cleanup
Merge branch 'kellybranch'