Fix debug mode, Refactor splitting sentences
merge dev into dev