Started implementing an HMM. Compilation problems with my templates