EWS and ILSGateway custom modules refactoring

It feels risky to not have backwards migrations (though I don't feel strongly about it in custom app code).