Added templating system   (Contains bug)

The other parts of the app are unaffected, but the added feature
contains a bug and does not work yet.