Change css classes in modal dialogbox, refactor home controller in js