removes some code smells