Context and template rendering stubs, some refactoring.