Started adding Piece Unittests
Some basic piece functionality tested
Also did some permission modifications