completely off the top of my head....
Caleb Bradham developed Pepsi in the mid 1890's for his drugstore. One of his brews became popular, and became known just as "Brad's Drink" but over time the name Pepsi-Cola was applied to it. (if I recall, it's because it was promoted to aid digestion in similar fashion that pepsin was supposed to) Bradham had to buy out the trademarks to one or two other companies that used similar names for their cola drinks to secure his trademark, and the dates on the oldest one is how Pepsi got the 1898 start date.
In around 1906 when the Pure Food and Drug Act came out, Pepsi was in the minority of patent medicines and fountain drinks that passed it without needing to make any modifications - like Coke did in switching to "spent" coca leaf. Pepsi promoted this fact at the time. Bradham started messing with the formula in the WW1 era when the company was faced with problems due to the fluctuating sugar market which, in part, killed their finances, and bottlers asked for caffiene (I would guess as more of a "hook" for the consumers) but the company went bankrupt. It was kept alive through the 20's and into the early 30's, barely, by a financer that bought it, but it ground down and was bought by Mr Guth at the Loft Candy stores, who had their chemists reformulate it. This is when Pepsi started to have the formula similar to what it has today. I think the only modifications to the formula after that time were in the early 50's when Pepsi reduced the sugar content, and in the 80's when they went switched from cane sugar to corn sludge.
-Andy
Give me some cane sugar Pepsi in a glass bottle!!