Code cleanup of classification behavior and utils.