We propose a unified framework for estimating integrated variances and covariances based on simple OLS regressions, allowing for a general market microstructure noise specification. We show that our estimators can outperform in terms of the root mean squared error criterion the most recent and commonly applied estimators, such as the realized kernels of Barndorff-Nielsen, Hansen, Lunde & Shephard (2006), the two-scales realized variance of Zhang, Mykland & Aït-Sahalia (2005), the Hayashi & Yoshida (2005) covariance estimator, and the realized variance and covariance with the optimal sampling frequency chosen after Bandi & Russell (2005a) and Bandi & Russell (2005b).The power of our methodology stems from the fact that instead of trying to correct the realized quantities for the noise, we identify both the true underlying integrated moments and the moments of the noise, which are also estimated within our framework. Apart from being simple to implement, an important property of our estimators is that they are quite robust to misspecifications of the noise process.