better comment function that ignore empty lines
Replacing my folding function with one I found online

My function worked in the end, but it took way too long.  Instead of learning
the nuances of caching values, I found a script online that does this and
modified it to suit my needs.