Split sentence handling out and add tests