Refactored the jt-affine module