Api/changes

@oalders : I have made all the changes to the scripts in this pull requests. And tidied everything.

Please have a look at it.
We don't need this extra newline.