reference fixes and commenting