Fix route endpoints. Add CORS support.

- CORS support
- Fix endpoints