fix some more bugs and cleaup the ui a bit