Removes the entity layer (if exists) of the object (in memory)

def remove_entity_layer(self):
        """
        Removes the entity layer (if exists) of the object (in memory)
        """
        if self.entity_layer is not None:
            this_node = self.entity_layer.get_node()
            self.root.remove(this_node)
            self.entity_layer = None
        if self.header is not None:
            self.header.remove_lp('entities')