url import compat for 1.5+ and lots of pep8