Fixes logic error in check_cells_for_future_state method
Finalizes code structure