Syntax cleanup

Make pyflakes slightly less angry at my abuse of the language.
Added CORS headers

Since this is for development on localhost only can't really see any
harm to having them always on.