Some fixes in commands and viev models