An integrated diabetes management (IDM) system includes a safety layer which, in one configuration has two components, one located between a glucose sensor and a controller and a second component located between a controller and a pump, to monitor various aspects of signals and modify those signals for compatibility and safety purposes. In one application, the safety layer receives output control signals from a controller and modifies those control signals as a function of an actual amount of insulin delivered to the user. The safety layer allows for an increased level of safety in the IDM system and permits development of separate hardware and software upgrades with the safety layer assuring that compatibility between components will continue.