add some dialog messages, code cleanup