Refactoring / Duty-module and corresponding test added.