Fixed up a teensy error in the chunk and documented the helper functions.