Cleanup some misc code.