Fixing code smells