Added basic piece.c functions