Merged refactor_ajax onto master