Finished implementation of the simle threshould finder.