Implemented first version of autocomplete. To be polished.