Modifications added to allow CORS