Refactored listing retrieval to reuse common code
Issue #9.