In several modules, switched external API numbering from (error-prone) defines to enum.