Added serialization tests

- Corrected some serialization issues
- Renamed test-dsx.js to test-deserialize.js