I'm nit sure if this is the right forum for my thread, if not please redirect me

I'm wanting to a) remove my iOS 3.1.3 jailbreak so I can upgrade to ios 4 and so I can jailbreak again(know how to jailbreak- not my question) with the new iOS and if it slows slows my 3GS which I have heard happen then b) know how to downgrade from 4 to 3.1.3. If there are other threads in this let me know I just can't seem to find any. Cheers!