Update to latest codeline

Based on Chuck Severance’s work with Sakai, re-using much of the
library code. Chuck improved his library, I am syncing it with this
project.