Reorganized market.rb methods