Dual class version working, now generalizing to multiclass.... committign
just in case I mess anything up.