Refactored ajaxLab