modify code to work with v1.8, added api_version() to return right version
Merge pull request #7 from greencrab/master

Update the code so it'll work in v1.8