Autocompletion fixes and jQuery-less refactor.

Fixed autcompletion and removed needless jQuery.