Refactoring rmstr.cpp, rmpls.cpp, rmfiles.cpp.