jt-affine and jt-mosaic optimization, addition of Translate speed tests and code refactoring