Refactored ScriptingCore singleton.

The singleton pattern did not allow for deletion
of the singleton.