Refactored print() functions into stream operators.