Added main to functional test.