xA lot of cleanup and commenting. Some stuff:
* A better off-by-one bugfix
* Commentes
* Some _internal identifiers fixed