Improve (de)serializing; add new classes