Merged updated code for the Key controller from a contribution from
Makoto Ishijima. This version of the Key controller conforms to my
modified version of REST_Controller.