Refactor templating mechanism

a simple else after the previous else if?