new directory for tests
added remaining functions
cleaning affine
changed affine error handling to raise exceptions
fixed error handling in sum_squares as well