Democratic transformation and legal reform