Refixed GUI and a few misc bugs