Unittests

see individual commit comments, additionally this branch turned up one bug which has a `TODO` marker in `sclang.py`