better CORS support, added documentation