whitespace and minor code style cleanup