Default [Q] help please?? returning device to standard

hey, I have bought a second hand nexus 7 (wifi only model, 1st gen), and its rooted, got superuser and got team win custom recovery, i want to get rid of it all and return it to a factory state, i want it flashed back to factory rom etc, but i can not do it ive tried following online guides and failed. please can someone help im getting quite frustrated.