Changed leveling and wave formulas