Allows type 9 dihedrals to be added together.

Additionally some dihedral parsing cleanup.