Some changes and a test script.