[buffer] Piece visitor, remove unused types and we still need to check on geometry_code