Unit testing reveals further weaknesses. Fix in progress.