Modal dialog done. Code cleaned again!