He is particularly remembered for his Diary (1660–69), an important record of contemporary events, such as the Great Plague (1665–66), the Fire of London (1666), and the sailing of the Dutch fleet up the Thames (1665–67). The Diary was written in code and was first deciphered in 1825. Pepys became secretary of the Admiralty in 1672 but was deprived of his post in 1679 and committed to the Tower for his alleged complicity in Titus Oates’s fabricated Popish Plot. However, he was reappointed in 1684 and became President of the Royal Society in the same year.