WL-1621 Update to Sakai 10 code.

Simplify the code, rather than duplicating it.
WL-1932 Fix typo.
Merge pull request #17 from ox-it/WL-1621

WL-1621 Update to Sakai 10 code.