Fix a few warnings flagged by PyDev

- Unused import of urlparse
- Unnecessary definition of variable
- Incorrect indentation