Kill dead template code

Lots of unused variables

Change-Id: I24451cb8c9d05de94bede0536035bceea51fe822
Merge "Kill dead template code"