We need to abstract away the commonality in this file. There is a lot of code repetition, since all these methods are effectively doing the same thing.