Fixing failing unit test
Summary
This MR introduces the following changes
- fix a unit test which failed from time to time (this was a problem since the usage of sets was introduced in !414 (merged))
- adds the changes from !492 (closed)
- closes #161 (closed)
Conformity
Edited by Alexander Froch