Added the submit function, search string detection, arrow key and click controls