All these things are covered by the strict use of televisions (and films) most over used commodity "UNOBTANIUM".
It is a substance that can be anything, solid, gas, liquid.
It can do anything, hold things together, take things apart, shrink things, grow things, fill plot holes, correct bad logic, and explain the unexplainable.
Depending on the catagory of the show (Sci-Fi, Fantasy, cartoon) it can be found in science, magic, or just everyday life.
It is known to appear whenever the writers can't find a "real" way to get the characters out of a situation, and dissapear by the end of the episode.
It may not appear in the same fashion in every episode, as its properties change depending on what exact situation it is in; it can even change properties in the same show.
For further examples, please reference the following:
1. any cartoon where people hang in air after walking off a cliff, or otherwise can't follow the "laws" of physics.
2. any episode of "Star Trek"; espeically any with references to the following; positrons, chronotons; "subspace", or nanotechnology.
3. any spy movie (Bond) where the agent could have used a device to get out of any previous situation and ended things 2 hours ago, but waited until the last 15 minutes to use it for the finale.