[#54696162] refactor javascript into objects

(A) objects are still residing in contents.js (B) i consolidated the
document.ready calls
[Finishes #54696162] refactoring / removing old comment cruft