refactoring models for better score on codeclimate