Refactoring pets2 rails application