Refactor tests into multiple files