Added license headers and improved URLResource impl