Refactor range code to its own subdirectory