refactoring core for Dart: subclasses