Added frame for GUI, fixed some errors