Added functionality to add templates