improved gui
fixed a few bugs