Abstracted some methods that were duplicated.