If you want to restore to 3.1.3 no jailbreak and no shsh follow these steps.
1 download sn0wbreeze (latest version) and 3.1.3 for your device
2 open sn0wbreeze and choose your ipsw for 3.1.3
3 DO NOT CHOSE CUTOM PACKSGES OR WALLPAPER OR BOOTLOGOS, JUST CLICK CREATE IPSW AND NEXT let it create a new ipsw and patch kernel
4 restore your device to the new sn0wbreeze ipsw (put device in dfu hold shift (windows) option (Mac) and restore find ipsw
5 once restore is finished set up as new device for best performance (be aware all apps may not work)
6 download iFunbox
7 in iFunbox go to applications folder for you ipod or iPhone and find Cydia.app
8 right click Cydia.app and click delete
9 reboot your iphone or iPod and you shouldn't have cydia and you can't tell your jail broken.
I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR IDEVICE.
I HAVE NOT TESTED THIS BUT IM PRETTY SURE IT WILL WORK