JS cleanup/edits in assets/javascripts

Some conversion of Prototype code, and general cleanup of code in files in `assets/javascripts`. This folder should 100% converted after this.