Merge pull request #20 from Windower/4.1

4.1
Adjustment for API changes
Merge pull request #535 from z16/4.1

Adjustment for API changes