Minor corrections and test script.