Cleanup module initialization

* Compiling for Py 2 no longer gives a warning about an unused variable
* Simplified ifdefs