Remove unnecessaries functions in the apiquery