minor fixes for code style and a nice clean diff