Working on refactoring the tests in the functional package