reorganization and beginnings of api