use URL rather than String where appropriate, fixing #1