Algorithms for Markets: Matching and Pricing