Documented the code a little.