cleanup of keycode stuff --KW