Added handle_action function. Not working but outta time to correct tonight