Added support for horizontal and vertical alignment options. Added some support for dialogs.