use ref rather than make-ref here
bootstrap with fixes for ref and a few other minor bugs