added template path replacement, moved demo resources to the templates dir