DDS code readability improvement

* Improve readability of DDS code
* Fix bug setting MSB