Small refactoring of Percolation.java