CORS, bug fixes

added CORS support, and fixed a bug with AddItems