added more logging.
added logging around locks on pieces.
fixed a bug in method for scanning linked list in pwp.h
updated todo.