Fixes for unit-tests, old tests did not remove instances, did not wait
for session to close, etc.
Forgot to add new bitfield class
Merge pull request #2 from NielsZeilemaker/test-cleanup

Fixes for unit-tests, old tests did not remove instances, did not wait