Napoleon drafted the Constitution of the Year VIII and secured his own election as First Consul, taking up residence at the Tuileries.