Remove code smells