Refactored distribution implementation after primary review.