Cleanup some code