cleaning up that smelly code