RWQueue refactoring