Add serialize (untested).