Fixed errors. Gui works.