Refactored printing functions bigtime