Add output trimming