Disallow trailing invalid code in model source
Added DataContract serializability to commands