Create shutdown dialog only once

Cache the object so that we only create it once.
Remove leftover

Remove useless comment.
Fix typo

It's onClicked not clicked.