Duplicate code clean + Cross validation tests