Small improvements to API