moved Cmd functions to Cmd object inside DOM