reformatting & refactoring CWQueue
cleaning up CWTree