Merged changes from Neal's repository.

Along with associated fixes.