clean code
put dialog UI functions in a new js class
change addressbook name in UI when changed