Moving up some definitions to fix the bookmarklets (thanks Sam Tran!)