Generalized tests in scikit-learn. Code cleanup in system.jl