Minor changes to clean-up code