newrange: read-only getters, empty range slice fix,  and refactoring