Adjusted code formatting, and implemented methods in Piece