Autocomplete refactoring