Updated the readme and bug fixes for the api