Default Xperia Z (Telstra AUS) stuck in bootloop but can access TWRP

Hey guys spent about 8 hours today attempting to root, unlock bootloader, install custom recovery (TWRP), install custom ROM (PAC ROM) and custom kernel (MEOW).

I got as far as installing TWRP but for whatever reason the OS got deleted while flashing it. So now I have no OS and its stuck in bootloop. All I can access is TWRP. How do I get it out of bootloop and reinstall the original Android 4.3 OS with Sony's bloatware? After I reinstall the original OS/ROM. I'll attempt to install PAC ROM and Meow and g-apps

How do I reinstall the original OS/ROM and get it out of bootloop?
How do I install PAC, MEOW and G-APPS?

Please provide links or instructions thank you.
Somebody please help me!

Sent from my GT-I9305T using XDA Free mobile app