ECS refactoring/rewrite (WIP)