Added experimental reduce code
Added tex changes to match pdf