some minor modifications on the ecs
renamed type_attribute
fix some minor bugs in the ecs