Updated for API
Fixed reformatting
Merge pull request #1 from Waterpicker/master

Updated for API changes