implement serializers for models in a separated class and add deprecation warning for old-style extract methods in models