refactor piece and board classes