Minor efficiency improvements to some methods in the piece class