Refactoring typeaheads for bootstrap3.