Minor clean-up of code