Syntax highlighting improvement for library/modules.
Make folding a bit more robust.

This is the start of improving folding for when error handling
starts being added.