Move trimming to keys not values