Added Serializer and the corresponding tests.