Code cleanup

Resume code cleanup and correction of folder size calculation