changed some coding standards after review, template files-tried to use : in if else foreach, some comments