Move main method int seperate class