Refactored to have cells solve themselves if absolutely constrained by their neighbours