add autocomplete script and missing bits