application.js, listview.js: Code cleanup

Code cleanup, plus remove paste from middle-click/scroll mouse buggy-ness