Small adjustments to account for DSmatrix changes
Cleaned up, fixed bug, and removed redundant methods
added unit tests for revised DSMatrix