Autocompletion refactory