Reimplement IdRef. Add Apache 2.0 copyright notice to files.