Algorithm up, works for 20/91 all-sat.
Final submitted code.