Add comments and clean things up a tad
Refactor the line drawing out
Fix the export function, as it was still assuming we were using the debug code
Operate on a duplicate canvas
Add scaling and remove normalization (as it makes the image look worse for less benefit)