restructure of commands and more int tests of stash commands