Modified js and html to show text in typeaheads