added auto-detection of serialization format for deserialization
Merge remote-tracking branch 'origin/unstable' into ratul