Begin to add weak reference support #3