Restructuring api