* replace weakref with a list * add unittest * fix lint * fix handling * fix unittest * change code style * fix lazy tests