More work on injecting template parser