Refactored and tested output methods