Add affiliate parameter to usage message
autoincrement ID fields, because that's what one does
Refactor to provide data completion as a function that can be
called externally
Minor fixups