Fix codes; add references and reference range