Diffuse interface modeling of two-phase flows based on averaging: mass and momentum equations