Cleaning up broker code.