Got rid of some code duplication