Improved folders

Revisions to code for reading folder names