Addition of the actual registration code.
Transformation matrix generation is added.
Various smaller fixes.