refactored PieceType. fixed a few typos.