Added support for clicking on auto complete item to select
Cleaned up functionality for allow free text with auto complete