Refactored autocompletion. (This breaks the traditional completion.)