Template files and finalized tab switching

The iframes load their designated file and it correctly switches
between previews.