Avoid namespace pollution and remove unused assignments

First of all I would like to say that this is some really nice and clean Python code, kudos for that!

Just a couple of things I did here:
* Removed unused assignments
* Replaced `import *` occurrences with explicitly importing only what was used - no need to pollute the namespace, but also this makes the code much easier to follow

I hope you find this helpful.

Andreas