Added methods to trim and set minimum query chars to AutocompleteField API
Restructured code