Const correction.
A bit more thorough (checks null etc).
Formatting and cleanup for easier reading.
Formatting and notes.