Propagation of CMEs in the interplanetary medium: Numerical and analytical results