Uses classList.remove to remove classes instead of regex, adds preventDefault to anchor form close button