remove debug trace
cmd refactoring
added strout(), stash(), and stashfree()