Abstracted ajax calls into a service