Feature/more flexible template handling

period