Restructured api