More refactoring.
Added missing files.
Fewer global states. More OO.
Less global state.
pure/nothrow
Comments and variable naming changes.