Fixed import bug in previous commit.
Fit now updates template values and generates a residual map automatically.  Added method GetResidual.