Centralized output formatting. Closes #2.