Changing internal API to a more fully featured external API

I have bought in an API from elsewhere to use instead of the internal API. This will save development time and while needs a few improvements, its a lot better than the internal one we used to have.