directory clean up and file separation