Random

A few commits I made debugging why my PDF didn't parse.

Includes:

 * Fixed two bugs.
 * A bunch of small CS fixes/improvemens.
 * A little refactoring.