remove unused variables, make some methods static
Merge pull request #49 from jochenberger/optimizations

remove unused variables, make some methods static
Merge remote-tracking branch 'upstream/master'