update output refs when question ID changes

Yea, still wanting to figure out how performance is affected by these changes. Any suggestions on how to improve it?