Revised imports.  Added test function.
Fixed various syntax errors as the result of pulling in code from the attic.