Move the whole bunch of nvm functions into their own header.