clean-up some code