Fixed suggestions from codeclimate