Minor refactoring

Move processing potential cells to its own method