Tidy core.js

There must be an easy way of knowing what dependencies are shared by app.js and commercial.js, and putting them in core.js...

Also rename `userPrefs.js`, it was annoying me