added cors support and more tests