Printing refactored