Conversion and draw functions in main driver. Made router types hashable