Remove unused vars
Remove unnecessary casts
Merge pull request #67 from asmaloney/cleanup

Remove unused vars & unnecessary casts