Updated implementation to include updated template file functions