Rename API functions and throw errors

wrong indent