removed templates dependency from mainjs