Add on save handler.
Add primitive type tests.