Bumped version to 0.22.0.0
code cleanup thanks to code analysis
Regenerated documentation
Use Math.Min() to take advantage of JIT instrinsics
Merge remote-tracking branch 'upstream/master'
Merged with upstream master.