Added UI constructor function