parts[0]
keelan's correction
corrected pop()
corrected pop()
fix to i_final j_final being None
corrected out of index error
corrected weird tree nodes for phrase_heads
merged with julias changes
merged with anya