Widget UI 

widget ui code refactor