better support for CORS
some parser improvements