WL-1621 Update to Sakai 10 code.

Simplify the code, rather than duplicating it.