Once you get rid of the `.record`s (see comments below) you won't need `trim` anymore. Same for the functions below.