Remove a bit of duplicate-ish code