Document and cleanup TemplateContext class.
Removed wrap_layout