CORS support
extracted configuration
improved code coverage