Piece api updates and tests