Fix merge errors.

Done by comparing with a previous attempt at a rebase, and looking back
in the history to resolve differences.
Partial update of build files from previous rebase attempt.
Update build file lists and add comments to them