Some clean-up of the code.