Fixed a memory leak on destruction
Added entity_has_component()