Started rewriting functional tests.