Rewrote string template engine implementation