Adjusted cmake to run code without a console, cross-platform
Reformatted source file