Rework autocomplete component so it sucks less

[Closes #51]