Refactor out duplicated code