Add tests.
Add serializer.