Misc tweaks
Minor bugfixes. Variable memory is now wiped properly.