Added CORS support via corser, reformatted most of the files and added documentation to the api methods