refactored attibutes

need to add command by attributes on viewmodels and close vms after ok
command click