removes junk files and updates structure for real