added error handling, added promise to autocomplete method, a slew of other tweaks