Small template fix and add some comments