Changes in ui and some code