Added Paolo's latest changes.