Efficient Grid Connected Buildings: A Distributed Control Framework for Managing Flexible Loads (BuildingControls)