Improve graph drawing

It is a first step. The hard parts are not done yet.