Refactor tests into to separate modules.