Move NBH code to a new file.