The bulk of the changes are in here, study them carefully!