refactored ecs compiles