Code documentation added. Written by Michael.

Documentation for the testing logic of the pattern creation process has been written.
Needs further work (Support #205)