Dependency cleanup
Bugfix, added Unit-Test