Extract API and Error classes