Moved stash related stuff into script.
Merge pull request #112 from murrekatt/move_stash

Moved stash related stuff into script.