ive made this script to reset firefox so it reverts to setting saved

ive made this script to reset firefox so it reverts to setting saved

how can i make it a better script ??
i’ve used my little knowledge of applescript to do wat i wanted and it works

any advise will be appreciated ?

Reset firefox:

set prefile to "~/Library/Preferences/org.mozilla.firefox.plist"
set crashfile to "~/Library/Logs/CrashReporter/firefox-bin.crash.log"
set appsupportfolder to "~/Library/Application\\ Support/Firefox"
set reloadFiles to "~/Library/Application\\ Support/.Firefox_Copy"

tell application "firefox"
	quit
end tell

delay 2

try
	do shell script "rm -dr " & prefile
end try

try
	do shell script "rm -dr " & appsupportfolder
	set result1 to 123
end try

try
	do shell script "rm -dr " & crashfile
end try

if result1 is equal to 123 then
	try
		do shell script "ditto " & reloadFiles & " " & appsupportfolder
	end try
end if

THis one sets the folder to revert to up and also can remove all settings

-- Save Firefox Settings for Reset Firefox script

set appsupportfolder to "~/Library/Application\\ Support/Firefox"
set backupFiles to "~/Library/Application\\ Support/.FireFox_Copy"

set firstDialog to "This script will remove the current files used to restore firefox(only if run before)

To Remove all firefox settings click Remove

To save current firefox settings to revert to at a later time click Save"

display dialog firstDialog buttons {"Remove", "Save", "Cancel"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "Remove" then
	tell application "firefox"
		quit
	end tell
	delay 1
	try
		do shell script "rm -dr " & prefile
	end try
	
	try
		do shell script "rm -dr " & appsupportfolder
	end try
	try
		do shell script "rm -dr " & crashfile
	end try
else if the button_pressed is "Save" then
	tell application "firefox"
		quit
	end tell
	try
		do shell script "rm -dr " & backupFiles
	end try
	try
		do shell script "cp -R " & appsupportfolder & " " & backupFiles
		display dialog "Done" buttons {"ok"} default button 1
	end try
end if

Model: iBook
Browser: Safari 312
Operating System: Mac OS X (10.3.9)