Initial implementation of the classify method

This isn't working yet, but this is the beginning of the implementation.