whitespace/pragma/import cleanup
fix incorrect types for adjustDia and adjustDia2D

The (V a ~ V2 a) constraints made them compile, but make no sense: the
vector space for some type 'a' can't be a pair of itself.