Added a few comments, crude template check