added live template expansion code for BB router and views.