You should move those two resets into a setup function at the top level. That will be less code but will also make the setup functions clearer and it will be easier to spot the differences.