Improve typeahead integration. Fixes #13