Refactoring of cpRwLast
Refactoring of rwMiddle