huge use of weakrefs to remove memoryleaks due to circular references