I used the datasheet(s) as a framework to set up a basic sketch.
The idea is that if the code has been proven to be okay (it is), someone might use it to extend it and put it in a class.
So all the defines are the registers and the bits in the registers. I named them the same as in the datasheet(s).
You have to keep the datasheet next to it, to know what it is about.
But that is not all, there are also undocumented registers.
If you take a look at the code by Jeff Rowberg, you see he has more registers. http://www.i2cdevlib.com/