code cleanup, piece.h commented