Some changes in movement calculation.