lots of work on references/targets/db