Did some cleanup. Used template 2 (and found a bug in pawn B1)