adding the option to specify zone name when getting the templates. this will resolve the problem when 2 zones have the same templatename within the list.
fixing some code error.
updating the template zone option