core/providers: refactoring, abstr.classes replaced with traits, code deduplication.