Remove code duplication in CGALExplorer.