Fix code problems + GUI