Issue #4 corrected and further improvements.

Check for peak position of max. correlation coefficient added.
Separate function for evaluation of iteration step. And other
improvements.