Autocompletion fixes and jQuery-less refactor.

Fixed autcompletion and removed needless jQuery.
Let's keep this convention - it's used other places in the project and I would like to keep the consistency.