Refactored system to separate view/template rendering from controllers

A basic change (separation of concerns) for template/view rendering