Upgraded to 1.9 API.
Merge pull request #47 from brettp/1.9

Upgraded to 1.9 API.