Use modern, namespaces, enum.
Add private method header.

Fixes test warnings.