Tidied the functional tests