I recently purchased several iPhones of different firmware versions for my family. I would like to unlock them and make them sim-free as well as allow homebrew applications and games to run on the devices.

I will appreciate any insight and help downgrading/upgrading or whatever needs to be done to do this.