Initial check-in of affine code and tests
Fix paths and dependencies