Updated main function for cleaner printing and console view