Refactored framewok serializer a bit