Bottles with removable stoppers: when the stopper is in the bottle, the bottle is functionally closed, but the stopper can also be removed and used elsewhere. Descriptions of the bottle reflect its state intelligently.

"Trachypachidae Maturin 1803"
A bottle is a kind of container. Bottles are usually openable, transparent, and closed. A cork is a kind of thing. A cork is in every bottle.
Understand "cork [something]" as corking.
Understand the command "stopper" as "cork".
Understand "uncork [something]" as uncorking.
Corking is an action applying to one thing.
Check corking:
   if the noun is not a bottle, say "[The noun] cannot be corked." instead.
Carry out corking:
   try closing the noun.
Uncorking is an action applying to one thing.
Check uncorking:
   if the noun is not a bottle, say "[The noun] cannot be uncorked." instead.
Carry out uncorking:
   try opening the noun.
Understand "close [something] with [something preferably held]" as corking it with.
Understand "cork [something] with [something preferably held]" as corking it with.
Corking it with is an action applying to one thing and one carried thing.
Check corking it with:
   if the noun is not a bottle, say "[The noun] cannot be corked." instead;
   if the second noun is not a cork, say "[The second noun] will not fit in [the noun]." instead.
Carry out corking it with:
   try inserting the second noun into the noun instead.
Instead of closing a bottle:
   if a cork (called the item) is carried by the player, try inserting the item into the noun instead;
   otherwise say "You need a stopper of some kind."
Instead of opening a bottle:
   if a cork (called the item) is in the noun, try taking the item instead;
   otherwise say "[The noun] has no stopper."
Carry out inserting a cork into a bottle:
   now the second noun is closed.
After inserting a cork into a bottle:
   say "You stopper [the second noun] with [the noun]."
Before taking a cork when the noun is in a closed bottle (called the item):
   now the item is open.
Instead of taking a cork when the noun is in a bottle (called the item):
   move the noun to the player;
   say "You pull [the noun] from [the item]." instead.
Before printing the name of a bottle (called target) while not inserting, taking, searching, or removing:
   if the target is closed, say "sealed ";
   otherwise say "now open ".
After printing the name of a bottle (called target) while not inserting, searching, examining, or removing:
   if the target contains a noncork thing, say " containing [a list of noncork things in the target]";
   omit contents in listing.
Instead of examining a bottle:
   say "[The noun] contains [a list of noncork things in the noun]."
Definition: a thing is noncork if it is not a cork.
The Doctor's Cabin is a room. "A dark, cramped triangle, like a slice of cake, except that its sharp end has been cut off: and so low that a moderately tall man would strike his head on the deck above if he were to stand upright. Every free surface is covered with sheets of best Venetian looking-glass, to increase the light filtering in. Long use and the carpenter's ingenuity have packed in a folding cot and table, and lockers are built into unlikely places: lockers filled with specimens, skeletons, sketches, drafts and serial letters." The jug is a bottle in the Doctor's Cabin. The jug contains a beetle. The description of the beetle is "The doctor assures you that it is a nondescript."
Test me with "get jug / x jug / open jug / x jug / i / x cork / cork jug / i / uncork jug / i / x jug / get beetle / i / close jug / i / x jug".
Test me with "get jug / x jug / open jug / x jug / i / x cork / cork jug / i / uncork jug / i / x jug / get beetle / i / close jug / i / x jug".
Doctor's Cabin
A dark, cramped triangle, like a slice of cake, except that its sharp end has been cut off: and so low that a moderately tall man would strike his head on the deck above if he were to stand upright. Every free surface is covered with sheets of best Venetian looking-glass, to increase the light filtering in. Long use and the carpenter's ingenuity have packed in a folding cot and table, and lockers are built into unlikely places: lockers filled with specimens, skeletons, sketches, drafts and serial letters.

You can see a sealed jug containing a beetle here.

>(Testing.)

>[1] get jug
Taken.

>[2] x jug
The sealed jug contains a beetle.

>[3] open jug
You pull the cork from the jug containing a beetle.

>[4] x jug
The now open jug contains a beetle.

>[5] i
You are carrying:
a cork
a now open jug containing a beetle

>[6] x cork
You see nothing special about the cork.

>[7] cork jug
You stopper the jug with the cork.

>[8] i
You are carrying:
a sealed jug containing a beetle

>[9] uncork jug
You pull the cork from the jug containing a beetle.

>[10] i
You are carrying:
a cork
a now open jug containing a beetle

>[11] x jug
The now open jug contains a beetle.

>[12] get beetle
Taken.

>[13] i
You are carrying:
a beetle
a cork
a now open jug

>[14] close jug
You stopper the jug with the cork.

>[15] i
You are carrying:
a beetle
a sealed jug

>[16] x jug
The sealed jug contains nothing.