refactoring
dialog made look better changed.
some updates.
completed with refactoring.