Refactored renderer to use nested document & model context;
Fixed issues processing substitution for elements in <head>;
CLeanup in template renderer;
***Currently significant code duplication between ModelContext and PropertyLookup