Updated the API a bit