New round of refactorings and gateways integrations