Fixed GUI works now and deleted unused code