Does label encoding in all cases; Modified tests
Fixes the pyflakes warning