Actually, I am running into lots of small errors, missing semicolons mostly. Attached is a patch that lets the "sw" module build.