Refactored listing page to make code more re-usable.