Restructured API files to make space for sample, state and chain extensions