Implement some more variables, fix some bugs (teardown now works).