Giving current code a bit of a haircut.

Removed some duplication, simplified the construction of the
classifiers.