Add correct property type checking for Dialog
Add classes to created dialog elements
Chain some of the jQuery method calls