Better capitalization rules for titles and conjunctions. Also some refactoring