Add defaultObject() method to ScriptEntry and make some commands use it.