add get_ajax_action()
add hander for error
deleted  because I don't know how to use
fixed fatal error