Some intializing/code restructuring in main. Functional console output window