when she appeared in the main terminus , she had only just materialized from the imperial ship above the planet , where in the chaos of fleeing vessels , she had reprogrammed the last of the mechanized units .