Lots of tidy-ups after a self-review of the code. Added Ged#set_canvas to make testing nicer (and tests for that new method).