Rename some variables and add some documentation in TrimHandler.