converting typeahead test and using js files for templates