refactoring - contract moved to Contract class from Market and market moved to Market instead of Event