Fixed cmake to start as subsystem:Windows, and made some small changes in main for later tested.