More GM_ functions, less unsafeWindow

Maybe this will finally get Greasemonkey to love me!