     ;vifm - just run
     +#e::
     {
-        Run, %CygPath%\bin\mintty.exe --window max --class "Vifm" --exec /bin/zsh -l -i -c vifm, %CygPath%/bin
-        return
-    }
+        Run(CygPath . "\\bin\\mintty.exe --window max --class Vifm --exec /bin/zsh -l -i -c vifm", CygPath . "/bin")
+        return
+    }
+#If
 
 ;browser
 #If FileExist(BrowserPath)
     ;web browser - activate/run
     ^!;::
-        if WinExist("Mozilla Firefox")
-        {
-            WinShow
-            WinActivate
-            Send, !d
-        }
-        else if WinExist("Vimperator")
-        {
-            WinShow
-            WinActivate
-            Send, !d
-        }
-        else if WinExist("ahk_class Chrome_WidgetWin_1")
-        {
-            WinActivate
-            ControlFocus, Chrome_OmniboxView1
-            SendInput, {Home}+{End}
-        }
-        else
-        {
-            IfExist %BrowserPath%
-                Run, %BrowserPath%
-        }
-        return
+        if WinExist("Mozilla Firefox") {
+            WinShow
+            WinActivate
+            ;Send("!d")
+        } else if WinExist("Vimperator") {
+            WinShow
+            WinActivate
+            ;Send("!d")
+        } else if WinExist("ahk_class Chrome_WidgetWin_1") {
+            WinActivate
+            ControlFocus("Chrome_OmniboxView1")
+            ;SendInput("{Home}+{End}")
+        } else {
+            if FileExist(BrowserPath) {
+                Run(BrowserPath)
+            }
+        }
+        return
+#If
 
 ;adobe products
 #IfWinActive ahk_group adobe
     ~LAlt::return
-    LAlt UP::Send {Escape}
+    LAlt UP::Send("{Escape}")
 #IfWinActive
 #IfWinActive ahk_class illustrator
 +wheelup::
-    send {Ctrl Down}{=}{Ctrl Up}
+    Send("{Ctrl Down}{=}{Ctrl Up}")
     return
 +wheeldown::
-    send {Ctrl Down}-{Ctrl Up}
+    Send("{Ctrl Down}-{Ctrl Up}")
     return
 #IfWinActive
 
 ;close active window
 #q::
-    ActiveHwnd := WinExist("A")
+{
+    active_hwnd := WinExist("A")
     WinClose
     return
+}
 
 ;fullscreen
 #f::
-    WinGet MX, MinMax, A
-    if MX
-        WinRestore A
-    else
-        WinMaximize A
-    return
+{
+    if WinGetMinMax("A") {
+        WinRestore("A")
+    } else {
+        WinMaximize("A")
+    }
+    return
+}
 
 ;restore active window
 #s::
-    ActiveHwnd := WinExist("A")
-    PostMessage 0x112, 0xf120 ;WM_SYSCOMMAND, SC_RESTORE
-    return
+{
+    active_hwnd := WinExist("A")
+    PostMessage(0x112, 0xf120) ;WM_SYSCOMMAND, SC_RESTORE
+    return
+}
 
 ;minimize active window
 #w::
-    if WinActive("WTW$")
-    {
+{
+    if WinActive("WTW$") {
         WinHide
-    }
-    else if WinActive("Buddy List")
-    {
+    } else if WinActive("Buddy List") {
         WinHide
-    }
-    else
-    {
-        ActiveHwnd := WinExist("A")
-        PostMessage 0x112, 0xF020 ;WM_SYSCOMMAND, SC_MINIMIZE
-    }
-    return
+    } else {
+        active_hwnd := WinExist("A")
+        PostMessage(0x112, 0xF020) ;WM_SYSCOMMAND, SC_MINIMIZE
+    }
+    return
+}
 
 ;set active window as always on top
-#a::WinSet, AlwaysOnTop, Toggle, A
+#a::WinSetAlwaysOnTop("Toggle", "A")
 
 ;transparency
 AddTransparency(delta)
 {
-    WinGet, Transparency, Transparent, A
-    if ! Transparency
-        Transparency = 255
-    Transparency := Transparency + delta
-    if Transparency <= 10
-    {
-        WinSet, Transparent, 10, A
-    }
-    else if Transparency >= 255
-    {
-        WinSet, Transparent, 255, A
-        WinSet, Transparent, OFF, A
-    }
-    else
-    {
-        WinSet, Transparent, %Transparency%, A
-    }
-    return
+    transparency := WinGetTransparent("A")
+    if !transparency {
+        transparency := 255
+    }
+    transparency := transparency + delta
+    if transparency <= 10 {
+        WinSetTransparent(10, "A")
+    } else if Transparency >= 255 {
+        WinSetTransparent(255, "A")
+        WinSetTransparent("OFF", "A")
+    } else {
+        WinSetTransparent(transparency, "A")
+    }
 }
 #WheelUp::AddTransparency(12)
 #WheelDown::AddTransparency(-12)

    ;ssh to cyclone - activate/run
    +^!]::
    {
        Run, %CygPath%\bin\mintty.exe --title "Remote terminal" --class mintty_ssh --exec /bin/ssh cyclone, %CygPath%/bin
        return
    }
    ^!]::
    {
        if (!WinExist("ahk_class mintty_ssh"))
        {
            Run, %CygPath%\bin\mintty.exe --title "Remote terminal" --class mintty_ssh --exec /bin/ssh cyclone, %CygPath%/bin
            WinWait ahk_class mintty_ssh
        }
        else
        {
            WinShow
            WinActivate
        }

    ;vifm - activate/run
    #e::
    {
        If WinExist("ahk_class Vifm") {
            WinShow
            WinActivate
        } else {
            Run(CygPath . "\\bin\\mintty.exe --window max --class Vifm --exec /bin/zsh -l -i -c vifm", CygPath . "/bin")
            WinWait("ahk_class Vifm")
        }
        return
    }
