Minor bug fix in plotMeanField
Comment clean up in code
New 3D array to 2D matrix conversion function