main.lua adapted

gui integrated, soon the main menu should work aswell