Batteries and Electricity Market Design for Residential Prosumers