Rewrote removeRedundantFiles