typeahead.py unecessary code removed