Refactored solution to allow different cell selection strategies to be defined.
Added in an optimised cell selection algorithm.