Renamed 'partition' util function to 'classify'.