Refactor to allow passing in data to autocomplete data
Nesting is working