My frame didn't come with any cords installed in the internal routing. Just saying that I ran the bare cable from the derailleur end up to the headset, since there is a sleeve inside it really doesn't matter, just saves you a minute if you are unsure about which hole to use up at the top of the head tube.
For the brake line, I would suggest not disconnecting the caliper, disconnect from the lever end, and feed the cable from the other chainstay up to the head tube. There is also a no-bleed method of doing this, you just remove the pads, squeeze in the pistons a little, feed the line, cut to length, push the pistons back out, and reconnect the lever. This method purges any air that gets in the line when sizing the cable length for you bike.