Added basic (incomplete) serialization support