Added most of a first implementation windowing system.