Code Cleanup

moveSinglePiece "function-ization"