Added unhandy autocomplete and some improvements to the code