Simplified range utils and added another test for compilation.