Got started on algorithm
Lots of work on the algorithm (not yet functional).