Fixed (mostly) deletion of functions/vars