Fix up the tests
Move this to the outer scope