Partial commit of the range analysis refactoring