How to factory restore phone?

Aug 13, 2013
So I got my Xiaomi on Monday and straight away put the miuiandroid rom on it and then started to look at other roms, I attempted to installed Marvin and found out I needed CWM so put that on and was impressed with Marvin and then went on to try WIUI.

Now after having a bit of play I decided that i'd like to start from scratch and have Marvin as my main ROM and attempted to do a fresh install via CWM but can't seem to get it working again.

Sooo is there a way to wipe the whole device and start again? I'm currently doing the OTA update in a hope that it gets rid of CWM but this is just a guess.

Is there an actual proper way to restore the device back to factory settings? Should have really asked this before going ahead and playing with it :D