iteration2 functional tests

There is a small chance there are a few errors in these tests. If they're non-trivial, let me know.