added template caching and routing, working on template rendering