Moved all requests into modules, more cleanup

Moved save hook into ui.js
genral whitespace etc cleanup
make all modules own their required requests