Refactor the tests into their own files