Mainly discrete mathematics. Also removed trailing whitespace.
One new equation and several updates.