Improvements to the auto-complete