Fixed redundant urlparse calls
Removed conditional cruft