Refactor object.rb