Fixed a bug in parser and added maps to template