Augmented the comments on several functions. Hopefully the algorithms employed will be clear.
Changed paths: