DRY up some stuff.