Add support for centered text.
Add basic dialog framework. Misc. updates to event handling.