Added Davids Dihedral feature from #20

This was add from #20 but somehow the merging got screwed so I imported his branch into mine and make this new pull request