cleaned server code of UI