cleaning up some code smells