Exit condition broken because current last and second to last states are
always the same after an edge. FIX THIS
Still working out bug in edge detection algorithm
Merge pull request #1 from vlantaca/micks_algorithm

Micks algorithm