cleanup
turn off drawing
repair and refactor edge routing code