Improvements and Unit Tests for Serializer