refined packet structure, added some functionality to stashes