Autocomplete and bug fixes