Update to work with new rust and libraries.
Work with ranges.
Use range macro