Finished the first basic setup for issue #3
And while at it, added template {replace} functionality