Refactored so that all lee-based algorithms extend a base and only have to implement 2 methods to work out the algorithm.