Add/Remove excess files, structured the loop control