prepared threading.

Also moved drawing stuff from the widget to the environment.
Views for each model become more interesting.