Fixed: simpler version of trancodeDataToDocument for stdClass. Changes tests and added new behaviour into exisiting test.