Moved stash related stuff into script.