Fixed templating to render models and collections automatically