Refactor addNewline to use delegate methods.
More converting to delegate functions.