removed un-used code and enabled cors