fix some small errors with how the range setting was working and improve data grooming