Make api more consistent