It may be true that Machiavelli wrote the Prince as a way to gain political office with the ruling Medici family. There is certainly historical evidence to support this, as well as the work itself. Much of it is justification of his own treatment by the Medici's. Because of his association with Savonarola and his part in the Medicis losing power one can't blame them in his being implicated in a plot to overthrow them. Maybe it was not an attempt to write a guidebook for the unification of what would become Italy under one ruler or the absolutism that France was so succesful in.