More work on the ECS refactoring