Improve backward and forward traversing algorithms
Add ranges.expand() and new traversing functions
Correct isEmpty() return value