API code clean