Added ScriptError case for redefining variables

Replaced uses of Default error case where appropriate
Added ScriptError case for no sdefined scopes

Replaced uses of Default error case where appropriate