How format nexus 4 before flashing new ROM
CWM is long dead, let it stay that way.

You are advised to use the latest TWRP recovery, which has an interactive graphic interface, has a more powerful and thorough wipe function, and has an inbuilt file explorer so that you could just look inside /system to see if the wipe indeed worked (don't forget to mount /system before looking in, though).

After installing TWRP, select Advanced wipe: /data, /cache and /system. Actually it shouldn't be necessary to wipe /system, since newer Android ROMs overwrite the whole /system partition, but since you claim you need a full wipe, this will do.