Made close button reuseable in Dialog.