Added CORS support. Removed spurious console.log calls.