Gui improvements and bug fixes