Cleans API and some deprecated references.