Refactored printing results