added xAsFunction examples and massively improved autosuggest code