Iran is a strange beast, politically. The country is in a period of transition. One of the problems is that the government and the judiciary are separate; although the moderates have recently won sweeping victories in the elections, and the current president is a reformer in favour of improving relations with the west, the judiciary and some of the clergy still contains legacy hardliner elements, which are mainly the older generation. The younger generation is rather more secular, modern and pro-western.
Thus the country is not out of the woods yet, as stories like this show:
http://edition.cnn.com/2016/05/11/mi...ranian-arrest/
Nevertheless, I have Iranian expatriate friends who are generally much more upbeat about the country. One of them was extremely pessimistic about Iran when I met him in 2010. He hated the leadership and was thoroughly depressed about the state of the country, which at the time was ruled by Ahmadinejad. Since then, the same freind is now much more upbeat about the country. He recently visited and he says that things are changing dramatically for the better. He said it takes time, but things are getting much, much better. Everything I have learned on the subject leads me to believe him. Rouhani stood for election on the promise of reform, improving relations with the outside world, and modernising. His landslide victory at the polls proves that Iranian society, while not perfect, is certainly moving in the right direction.