Clean up admin on ready

This PR cleans up admin scripts, focusing particularly on admin on_ready.js.

Tasks:

- [x] Move all loose code out of on_ready.js.
- [ ] Investigate which of the remaining initialisers are not global.
- [ ] Move global initialisers into somewhere more appropriate and kill on_ready.js all together.