Updated examples for selection module + refactored selection logic in library.