Refactor tests into separate files.