Added gui class and fixed stuff