Separated message serializer to another class