Developing Control Algorithms For an Artificial Pancreas