Track template dependencies

closes #126