Reformated source, and fixed some errors in the transformation of the target coordinates