refactor tests, updated typeahead