Small update.

- Tweaked function comments in bitmask.[ch].
- Reordered functions, tweaked function comments in buffer.[ch].
- Some renaming and added function comments in cx.[ch].