Fix accidental bitwise operator
Remove unused variables
Merge pull request #35 from mscdex/master

misc fixes