Abstracting server calls into a service