Initial caching implementation in relation to #257
Addressed #154 by allowing variable declarations and select other tags before and after the extends statement