removed some bugs, added some tests
Merge branch 'master' of https://github.com/dzigerlig/CDAR.git