Duplicated import removed. pep8 code.
Some long lines refactored.
New utils module with url encoding functions.
Merge pull request #17 from XeroX/master

Clean code. Sort of.