Optimized SingleClass and multiClass