unittests: Unittests for core module data strutures

~~Depends on #381~~ (which is merged)