cleanup some code.