WIP Cleanup
WIP CORS works but ugly
WIP Refactoring round 1
WIP Refactoring round 2