Some minor clean-up and adjustments to coding style