Moved a lot of functions to UIModule