Cleanup server code
Add CORS support
Fix indent
clean up validators
cleanup in memory storage backend
minor formatting