Refactoring autcompletion into a seperate file.