Improved functional tests.