refactor code to chromium style
always use datalist for autocompletion

Fix #434 again