Template class can now return the HTML

Instead of printing the HTML straight to the browser, Now the HTML can
be retrieved and passed into other templates.