some small error checks (combined with sabit's commit)
TODO improve detectAll
Merge branch 'master' of https://github.com/rsshah/DVS-Java