Restructure API files