DRY up some things