Fix import: use urlparse directly instead of urllib2.urlparse.
Cleanup: Remove unused code, convert pseudo-doc-strings to comments.

Mode removed code are print-statements commented out.