Refactor: rename the method that deals with writing csv headers.
Refactor: use the cleanupLastRow and createNewLineCharacter methods everywhere.
Refactor: Create the createCsvRow method.
Refactor: create a removeLastNewLineCharacter method name.