Kernel 3.x

* Updated the python script to match the 3.x changes
* Some other small updates