Fixed mistakenly introduced type parameter.
More detail in the README, and a few simplifications and clarifications in the code.