Rework object serializer