add docstring for %quickref
trim unused code