The elections showed the resilience of its people and the potential for growth. But they also exposed flaws that must be addressed