Added PieceTests and functions for piecetests