ListWindow and some cleanup

Tweaking ListWindow so wrapping works correctly. Some cleanup of event
processing to facilitate future work on event handling.