Small chores

Extractable parts of the commonjs-port branch.