Refactored some ajaxService code to remove nested callbacks and introduce promise chaining. Code is much cleaner and more effecient now