Updated model docs and demo
Added tests for compiling templates
Updated docs for templating