Clean up some code smells