This makes rename the test units by a consistent naming scheme, add several logs, and sort internal functions. No functional change.