Moved createDialog method.
setExtent method can now accept null extent, which will clear the graphics.