Refactor code @ project.rb file