Removed unused code and fixed some warnings.
Merge pull request #7 from arpg/warning_fix

Removed unused code and fixed some warnings.