merge API cleaning