tests: mark failing tests with xfail
refactor: move aggregation into own sub-module