Refactor and iframe fixes

* refactor template helpers
* fix iframes in model index directories (inject css/js correctly when `iframe: true` is specified)
* automatically install client-side dependencies (requires Bower preinstalled)