old changes from 2006-03-25 16:07 to support alternative code-ref parametars for filenames, read and update which enable query generation on the fly