Refactor these two files so they repeat less code.
Refactor these two files so they repeat less code.