More code folding tidy up
Code folding fixes