Energy budget and core-envelope motion in common envelope evolution