Fundamentals of Market Structure