Refactor of action_handler for correct class scoping/etc.