Refactor the button and feed link generation to make it more maintainable and flexible.