Correctly encode URNs with subreferences. Delete unused class.