Adds destroy functionality and starts fixing cors problem