Default Accidentally Formatted everything on Nexus 4 Help Please ( Somewhat Noob Friendly)

I basically went full derp.
Today i tried to root and flash P.A.C rom on my Nexus 4. I believe i managed to root it but when I went to flash the rom it failed. I tried over and over again but it didnt work. I followed the guide and still. So instead i thought i would format everything possible in CWM 6.0.4.7( or 6.0.2.3). Now i want to go back to factory state and try again. My phone is booting but stuck at the google logo. i can still go into CWM recovery and ADB bootloader. Help PLS. Im on a mac too.