Moved some variables initialization with the first-time setup.