This allows specifying ranges with from/to being inclusive or not, and providing a result limit (latter not implemented yet). This change just makes all current tests pass.