Major overhaul to support parsing of sentences