Reorganised API docs a little.