Added some listeners.
Improved dialogs.
Added ModalDIalog.