Remove unnecessary casts
Merge pull request #131 from agouge/unnecessary-casts

Remove unnecessary casts when possible.