Clean up javascript a bit.
Store the dataset array length to save browser resources, however small.
Localize a single typeahead variable for all of the data passed from php.