remove packages appended to the api object; include them only where needed