Fixes for compiler warnings
 - unused vars
 - init ordering in constructors
 - static vars and functions in header files
Merge pull request #73 from asmaloney/warning_fixes

Thanks (I'll just change the extern by a static method... it makes things clearer in my mind, especially about where the value is initialized)