remove newlines from titles when we index them
refactor a bit
Merge pull request #51 from bcail/master

remove newlines from titles when we index them