Changed brakes code to work with new hardware.