Allow server to be passed in