Rename API functions and throw errors

These lines won't work on Linux :-(    OSX is idiotic.