Re: The prefix number
As for changing the prefix code, it could be anything from simply telling the computer to change it (he had Captain Terrell under his thumb to do it if he needed a senior officer to do so) to some major hardware swapping. We don't know what it takes, just that it can be done in the field.
Then why did you say that it couldn't be too hard?
"He clapped his captain—his friend—on the shoulder. Yes, this man was very much like James Kirk, in all the ways that mattered." --Christopher L. Bennett-- Star Trek: Mere Anarachy, The Darkness Drops Again