Move main out from gui class