Initial implementation of the classify method

This isn't working yet, but this is the beginning of the implementation.
The ``aaa`` and ``bbb`` variables aren't used as far as I can tell -- can you delete these statements?