HSEARCH-436 Some whitespace and style improvements

Applied some of Hardy's style fixes and added some more.