Refactored related content code