Refactoring CORS tests.
Refactoring endpoints server from App Engine.