Added support for center and right aligned text
Fixes to window painting
Implemented most of the AppMessage/Dict functions