Refactored reference variable. Added new output. Inserted a reminder to
make a writeToOutput() private.
Removed test print.
Removed test prints.