Implemented the comparison engine

A ctypes function for finding the minimum of least squares and a comparison engine for shifting and comparing