Complete revamp of the ECS. First commit of the many to come.