Initial templates

Fixed initial values of templates so they don't wait until the second call to be shown.

Also moved templates into <script type="text/template"> blocks to be more readable, implemented getTemplate() to retrieve them.