Rework templating context access so contexts can be accessed through several layers