extract resource urls. minor cleanup