Refactoring the integration folder to reduce duplication