Clarified function definitions in library, and extended shakedown (new tests fail).