Ajaxhelper: added a check for context before returning a 501 for unknown actions. Refactored key into a class constant