Refactor CAS server to create it's own http.Server