Refactored behaviours and added more modules to declutter Ui.js