Core/InstanceScript: refactored load and save methods