Added some functional tests.