Design and Operation of Distribution Markets