Changed clear to use del [:] since it removes references to object