Updated demo app, fixed few bugs related to Serialization::write(..)