Adding first snapshot of ported code.  IT DOESN'T WORK YET!
This is a work in progress, so don't expect it to do ANYTHING
useful yet.