Dialog 2
Refactoring html
Restoring focus after window closes