- Updated to work with new market

Updated for new market and refactor'd a bit..