Move all url generation to Python. (closes #13)