Refactoring: separated the analysis of the island and the actual selection of the islands.