Add preferences in GUI. Drawing functions have been simplified.

Biggest change is that Constraint selection is now entirely done prior
to their display. Drawing functions are therefore simpler and do
nothgin not related to drawing.