move is_ajax to app class