Merging in Dave Howell's code.
Preserving license statements.
Applying a few local fixes.
55 files changed