Huge cleanup pass.

- Flat functions are now implemented in terms of CConverter.
- Changed most usages of 'endianness' to 'byte order'.
- Doc updates.