implemented CORS
updated some CORS options
setup events controller