Cleaning code, need more cleaning. Testing Affine transformation: improve.