Fixed #7 by adding serialization functions