Documentation additions
Fixing compilation problems, more work on speeding up affinity related operations
Cosmetics