More progress.

Explicitly order files so API module is on top.
Document more internal functions.  Starting on API.