Trimming plugin implementation