Replaced __class__ calls with type calls
Merge pull request #38 from mewwts/refactor/type

Replaced __class__ calls with type calls