get templates and js call neater