Created a function to close wormholes.

Created a function to close wormholes. This can easily be called by outside functions for outside events to close wormholes immediately. Also, cleaned up the automatic closing by making it call this new function.