Renaming updateVisibleData for clarity and refactoring selectAll