Heat flow and calculus on metric measure spaces with Ricci curvature bounded below -- the compact case