Created seperate ui hander class