Feature/more flexible template handling

100c