Just a cosmetic comment - can you try, where possible, to keep the amount of characters to max 79 characters? I know it's a bit of a pain, but it makes the code easier to review and follows the [Pep8](http://www.python.org/dev/peps/pep-0008/#maximum-line-length) convention.