Use StringLiteral for handling URLs

Also converts to a java URL as early as possible