Refactored to support processed blocks i.e. passing whole block of output to a ViewModel function
Fixed rendering from string and added test.