Barack Obama set out to end George Bush's wars in the Middle East and reset relations with the rest of the world.