We discuss a program for systematic studies of heavy quark production in pp, pA and AA interactions. The QQ production cross sections themselves cannot be accurately predicted to better than 50% at RHIC. For studies of deviations in QQ production such as those by nuclear shadowing and heavy quark energy loss, the pp cross section thus needs to be measured. We then show that the ratio of pA to pp dilepton mass distributions can provide a measurement of the nuclear gluon distribution. With total rates and nuclear shadowing under control it is easier to study energy loss and to use cc as a normalization of J/ψ production.