Complete exercise 6.3

Take some bit from the solution in the book
Fix return type of splitParagraph()