code cleanups (may break things)
add urlparse imports