Seem to have fixed the 'corner' periodicity issues. Dihedral calculations are now thread safe as well.