The years of bloodshed in France, led to the emergence of a dictator, who made himself emperor-Napoleon Bonaparte. He rose in the ranks of the army to the position of First Consul, the highest official in the country. Through his military strategies he won many territories for France and he soon declared himself an emperor in December 1804. France became a powerful nation in Europe under Napoleon. It was more of a constitutional monarchy than an autocratic one. He was defeated at the famous Battle of Waterloo by the Dutch of Wellington and sent to exile. Napoleon restored order in France. He changed the tax system and instituted new laws called the Napoleonic Code. This code made same laws applicable all over France and put an end to the privileges of the nobles.