Refactored patch fetching