Implemented Chomsky normalization. Code is still very messy, but works.