move main.cpp from gui