Refactored jquery ajax calls to use the shorthand methods and promises