Refactored idea.rb