Fixing an issue where code folding would fold too much code. Code cleanup.